package com.springmvc.study.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
// 代表这个类会被spring接管 被这个注解的类中得所有方法如果返回值是String并且有具体的页面跳转
// 那么就会被视图解析器解析
public class ControllerTest2 {

    @RequestMapping("/tt3")
    public String test1(Model model) {
        model.addAttribute("msg", "ControllerTest2");
        return "test";
    }

    @RequestMapping("/t3")
    public String test3(Model model) {
        model.addAttribute("msg", "ControllerTest2");
        return "test";
    }
}
